#ifndef _DTU_SOCKET_H_
#define _DTU_SOCKET_H_

typedef struct dtu_uart_data_s {
	int port;
	int len;
	UINT8 *data;
} dtu_uart_data_t;

typedef struct socket_info_s {
	unsigned char mode;
	unsigned char tls;
	
	int port;
	char host[256];

	int keepalive;
	int keepidle;
	int keepinterval;
	int keepcount;
	
	unsigned int timeout;



    unsigned int connect_retry_count;
    unsigned int send_retry_count;
	
	unsigned int heart_interval;

	char heart_buf[128];
	unsigned heart_buf_len;
	char heart_resp_buf[128];
	unsigned heart_resp_buf_len;
	
	unsigned int login_timeout;
	char login_buf[128];
	unsigned login_buf_len;
	char login_resp_buf[128];
	unsigned login_resp_buf_len;	
} socket_info_t;


void dtu_socket_cfg_init(int link_id);

socket_info_t *dtu_socket_cfg_get(int link_id);

void dtu_socket_cfg_update_nvm(int link_id);

void dtu_socket_cfg_remove(int link_id);


#endif
